# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=pytacle
pkgver=alpha2
pkgrel=7
pkgdesc="Automates the task of sniffing GSM frames"
groups=('blackarch' 'blackarch-sniffer')
arch=('any')
url='http://packetstormsecurity.com/files/124299/pytacle-alpha2.tar.gz'
license=('GPL3')
depends=('pygtk' 'libffi')
source=("https://dl.packetstormsecurity.net/wireless/$pkgname-$pkgver.tar.gz"
        'py2.patch')
sha512sums=('a45b78442e6341cccfd88f243b14628f07f57e0c1ddd7e590701b9bac06f084caad231c825dc62ea68b563733851b457c9638ed3807448289571c32c305e4a66'
            '3e7622b8d41e64f3f5fd956738a24ae7ab4c4fe1806bd86e16cdf620375214a0269a1ffa885d4e5bc6c2ca7c54f74ff8fc5dc446b72d4feacc0a063cc06ac580')

prepare() {
  cd "$pkgname-$pkgver"

  patch -p1 "$pkgname.py" "$srcdir/py2.patch"
}

package() {
  cd "$pkgname-$pkgver"

  install -dm 755 "$pkgdir/usr/lib/python2.7/$pkgname"

  install -Dm 755 "$pkgname.py" "$pkgdir/usr/bin/$pkgname"
  install -m 644 mcc_mnc.py "$pkgdir/usr/lib/python2.7/$pkgname/"
  install -m 644 windows.glade "$pkgdir/usr/lib/python2.7/$pkgname"
}

